/*
 * Copyright 2014 by État de Genève (Switzerland)
 * All rights reserved.
 *
 * Author: ELCA Informatique SA
 */
define(['plugins/dialog', 'services/config', 'i18n'],
    function (dialog, config, i18n) {

        /**
         * Modal with lock information for entities' forms
         * @param lockedBy
         * @param lockedOn
         * @constructor
         */
        var Locked = function (lockedBy, lockedOn) {

            this.title = i18n.t('cms:locked');

            this.lockedBy = lockedBy || '-';
            this.lockedOn = lockedOn || '-';
        };

        Locked.prototype.close = close;

        return Locked;

        function close() {
            dialog.close(this);
        }
    });